<link rel="stylesheet" type="text/css" href="/static/css/h5/index.css" />
<link rel="stylesheet" href="/static/css/pc/common.less" />
<link rel="stylesheet/less" type="text/css" href="/static/css/pc/index.less">
<style type="text/css">
    .rushToBuy1 .van-tab {
        padding: 0;
    }
    
    .rushToBuy1 .qgList {
        display: flex;
        padding: 18px 4% 17px 4%;
        border-bottom: 1px solid #d8d8d8;
    }
    
    .countDown>.spa1 {
        width: 16px;
        border-radius: 2px;
        background-color: #333333;
        color: #fff;
        font-size: 10px;
    }
    
    .countDown>.spa2 {
        margin-left: 0;
        line-height: 20px;
        font-size: 12px;
        display: block;
        margin-top: 4px;
    }
</style>
<div class="" id="content" val="11" style="width: 420px;">
    <div class="bkms">
        <h3 class="tit">爆品秒杀</h3>
        <div class="countDown" style="padding-top: 10px;padding-left: 15px;">
            <span class="spa1">09</span>
            <span class="spa2">:</span>
            <span class="spa1">32</span>
            <span class="spa2">:</span>
            <span class="spa1">44</span>
        </div>
        <div class="more" style="padding-top: 10px;">
            <p class="txt">更多</p>
            <img class="img" src="/static/images/h5/rightArrow.png" alt="">
        </div>
        <div class="clear"></div>
    </div>
    <div class="rushToBuy1" style="height: 500px;width: 420px;">
        <div class='swiper-top'>
            <div class='qiHuan' data-index='0' data-xunClass='xuan'>
                <span class="span1">周一</span>
                <span class="span2">抢购中</span>
            </div>
            <div class='qiHuan' data-index='1' data-xunClass='xuan'>
                <span class="span1">周二</span>
                <span class="span2">抢购中</span>
            </div>
            <div class='qiHuan' data-index='2' data-xunClass='xuan'>
                <span class="span1">周三</span>
                <span class="span2">抢购中</span>
            </div>
            <div class='qiHuan' data-index='3' data-xunClass='xuan'>
                <span class="span1">周四</span>
                <span class="span2">抢购中</span>
            </div>
            <div class='qiHuan' data-index='4' data-xunClass='xuan'>
                <span class="span1">周五</span>
                <span class="span2">抢购中</span>
            </div>

        </div>
        <div class="swiper-container">
            <div class="swiper-wrapper" data-activeIndex=''>
                <div class="swiper-slide">
                    <div class="qgList">
                        <div style="margin: 12px 0 2px -15px;">
                            <div style="z-index: 999;position: relative;top: 60px;height: 0;">
                                <a class="buy-btn" val="1" name="checkProduct">点击选择1</a>
                            </div>
                            <img src="/static/images/background.png" style="width: 399px;height: 147px">
                        </div>
                    </div>
                    <div class="qgList">
                        <div style="margin: 12px 0 2px -15px;">
                            <div style="z-index: 999;position: relative;top: 60px;height: 0;">
                                <a class="buy-btn" val="2" name="checkProduct">点击选择2</a>
                            </div>
                            <img src="/static/images/background.png" style="width: 399px;height: 147px">
                        </div>
                    </div>
                    <!--
                    <div class="qgList">
                        <div class="qgList_l">
                            <img src="/static/images/h5/yckh.png" alt="">
                        </div>
                        <div class="qgList_r">
                            <h4 class="tit">全期猫粮 1.8KG</h4>
                            <p class="content">优质食材，薯类膨化多肉配方</p>
                            <div class="qgPrice"><span class="box1">限时价：</span><span class="box2">￥72.8</span><del
                                    class="box3">88元起</del></div>
                            <div class="qgInfor"><span class="box1">还剩198件</span><a class="box2"
                                                                                    href="javascript:;">立即抢购</a></div>
                        </div>
                    </div>
-->
                </div>
                <div class="swiper-slide">Slide 2</div>
                <div class="swiper-slide">Slide 3</div>
                <div class="swiper-slide">Slide 4</div>
                <div class="swiper-slide">Slide 5</div>
            </div>
        </div>
    </div>
    <div class="xdqd">
        <img src="/static/images/h5/xdqd.jpg" alt="">
    </div>
</div>
<!-- <div class="modal hide fade" id="checkProductInfoByName" style="width: 700px;" tabindex="-1" role="dialog">
    <div class="modal-header">
        <button class="close" type="button" data-dismiss="modal">×</button>
        <h3 id="addRoleModalLabel">选择商品信息</h3>
    </div>
    <div class="modal-body">
        <form id="dataForm" class="definewidth m20" enctype="multipart/form-data">
            <input type="hidden" id="id" />
            <input type="hidden" id="config_id" />
            <table class="table table-bordered table-hover definewidth m10">
                <tr>
                    <td style="width: 25%;" class="tableleft">商品名称</td>
                    <td style="width: 63%;">
                        <input type="text" id="productName" style="width: 300px;" class="required-control" />
                        <span style="color:red;">*</span>
                    </td>
                    <td>
                        <a href="javascript:void(0);" id="queryProductInfo" class="btn btn-primary">查询</a>
                    </td>
                </tr>
            </table>
        </form>
        <table id="taskList_table" class="table table-bordered table-hover definewidth">

        </table>
    </div>
    <div class="modal-footer">
        <a href="javascript:$('.required-control').each(function(){$(this).css('border','1px solid #ccc');$(this).attr('placeholder','');});$('#checkProductInfoByName').modal('hide');$('#dataForm')[0].reset();"
           class="btn">关闭</a>
        <a href="javascript:void(0);" id="doSaveProduct" class="btn btn-primary">保存</a>
    </div>
</div> -->
<!-- <script src="/static/js/lib/xsw_js.js"></script>
<script type="text/javascript">
    _function.queryUserInfo({t:'indexProductConfig',config_id:$('#content').attr('val')},function (data) {
        if(null!=data && null!=data.products_id){
            var produsts=JSON.parse(data.products_id);
            if(null!=produsts && produsts.length>0){
                $.each(produsts,function (index,val) {
                    $(".buy-btn[val="+val.id+"]").text('点击修改'+val.id).css('background-color','red').css('border','1px solid red');
                });
            }
        }
    })
    var columns = [{
        field: 'id',
        title: '选择',
        width: '50',
        align: 'center',
        formatter: function(value, row, index) {
            return '<input type="checkbox" name="checkProductId" value="' + value + '"/>';
        }
    },{
        field: 'name',
        title: '商品名称',
        align: 'center'
    },{
        field: 'shopname',
        title: '所属店铺',
        align: 'center'
    },
        {
            field: 'price',
            title: '所属价格',
            align: 'center'
        },
        {
            field: 'status',
            title: '状态',
            align: 'center',
            formatter:function(value,row,index){
                if(value==0){
                    return '上架'
                }else{
                    return '下架';
                }
            }
        }];
    // 渲染table
    initTablePage({t:'product',sqlCount:'queryListPageCount'},{column:columns});
    //点击选择
    $("a[name='checkProduct']").click(function(){
        $("#id").val($(this).attr('val'));
        $("#checkProductInfoByName").modal("show");
    });
    //查询
    $("#queryProductInfo").click(function () {
        initTablePage({t:'product',sqlCount:'queryListPageCount',name:$("#productName").val()},{column:columns});
    });
    //保存
    $("#doSaveProduct").click(function () {
        if($('input[name="checkProductId"]:checked').length>1){
            alert_msg("只能选择一条");
            return false;
        }
        _function.queryUserInfo({t:'indexProductConfig',config_id:$('#content').attr('val')},function (data) {
            if(null!=data){
                if(null!=data && null!=data.products_id){
                    var produstArray=JSON.parse(data.products_id);
                    $('input[name="checkProductId"]:checked').each(function(index, val) {
                        var requData=$(this).val();
                        var flg=true;
                        $.each(produstArray,function (index,val) {
                            if(val.id==$('#id').val()){
                                flg=false;
                                val.product_id=requData;
                                return false;
                            }else{
                                flg=true;
                                return true;
                            }
                        })
                        if(flg){
                            var produsts={};
                            produsts.id=$('#id').val();
                            produsts.product_id=$(this).val();
                            produstArray.push(produsts);
                        }
                    });
                    _function.editUserInfo({t:'indexProductConfig',id:data.id,config_id:$('#content').attr('val'),products_id:JSON.stringify(produstArray)},function (data) {
                        $(".buy-btn[val="+$('#id').val()+"]").text('点击修改'+$('#id').val()).css('background-color','red').css('border','1px solid red');
                        $("#checkProductInfoByName").modal("hide");
                    })
                }
            }else{
                var array=[];
                $('input[name="checkProductId"]:checked').each(function(index, val) {
                    var produsts={};
                    produsts.id=$('#id').val();
                    produsts.product_id=$(this).val();
                    array.push(produsts);
                });
                _function.editUserInfo({t:'indexProductConfig',config_id:$('#content').attr('val'),products_id:JSON.stringify(array)},function (data) {
                    $(".buy-btn[val="+$('#id').val()+"]").text('点击修改'+$('#id').val()).css('background-color','red').css('border','1px solid red');
                    $("#checkProductInfoByName").modal("hide");
                })
            }
        });
    });
</script> -->